import java.io.Serializable;

/**
 * @ClassName Student
 * @Description TODO
 * @Author Li
 * @Date 2022/8/12 21:03
 * @ModifyDate 2022/8/12 21:03
 * @Version 1.0
 */
public class Student implements Serializable {
    // 加入序列版本号
    private static final long serialVersionUID = 1L;
    public String name;
    public Integer age;
    public transient Integer no; // transient 瞬态修饰成员，不会被序列化

    public Student() {
    }

    public Student(String name, Integer age, Integer no) {
        this.name = name;
        this.age = age;
        this.no = no;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getNo() {
        return no;
    }

    public void setNo(Integer no) {
        this.no = no;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", no=" + no +
                '}';
    }
}
